<?php

/* @var $this \yii\web\View */
/* @var $content string */

use app\widgets\Alert;
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
use app\service\UrlService;
use app\service\StaticService;

AppAsset::register($this);
StaticService::includeAppCssStatic("/css/left.css",\app\assets\AppAsset::className());
StaticService::includeAppJsStatic("/js/layout.js",\app\assets\AppAsset::className());
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php $this->registerCsrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>

<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Brand</a>
    </div>
      <ul class="nav navbar-nav navbar-right">
        <li><a href="<?= UrlService::BuildNullUrl() ?>">
            Hi~,<?= @$this->params['current_user']['name'] ? HTML::encode($this->params['current_user']['name']) : '' ;  ?></a>
        </li>
        <li>
            <div class="col-sm-2 " style="line-height:45px;">
                 <a href="<?= UrlService::BuildUrl('/admin/examination/index') ?>"><button class="btn btn-danger vertical-center ">考试</button></a>
            </div>
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
<!--  导航栏以下内容  -->
<ul class="nav-left-container">
    <li>
        <!-- li的class为active表示点击选中 -->
        <a href="<?= UrlService::BuildNullUrl();?>">
            <!-- aria-hidden字符串。可选值为true和false,true表示元素隐藏(不可见)，false表示元素可见。 -->
            <span class="glyphicon glyphicon-home f12" aria-hidden="true"></span>
            <span>页面</span>
            <span class="glyphicon glyphicon-menu-right f12 fr" aria-hidden="true"></span>
        </a>
        <ul class="nav-left-container-small">
            <!-- aria-expanded表示展开状态。默认为undefined, 表示当前展开状态未知。其它可选值：true表示元素是展开的；false表示元素不是展开的。 -->
           <li><a  class="J_menuItem" href="<?= UrlService::BuildUrl('/admin/personal/index')?>">个人信息</a></li>
           <li><a  class="J_menuItem" href="<?= UrlService::BuildUrl('/admin/personal/past')?>">往期考试</a></li>


        </ul>
    </li>
    <li>
        <a href="<?= UrlService::BuildNullUrl();?>">
            <span class="glyphicon glyphicon-calendar f12" aria-hidden="true"></span>
            <span>权限管理</span>
            <span class="glyphicon glyphicon-menu-right f12 fr" aria-hidden="true"></span>
        </a>

        <ul class="nav-left-container-small">
            <li><a href="<?= UrlService::BuildUrl('/user/index') ?>">用户管理</a></li>
            <li><a href="<?= UrlService::BuildUrl('/role/index') ?>">角色管理</a></li>
            <li><a href="<?= UrlService::BuildUrl('/access/index') ?>">权限管理</a></li>
            <li><a href="<?= UrlService::BuildUrl('/class/index') ?>">班级管理</a></li>
            <li><a href="<?= UrlService::BuildUrl('/user/userlog') ?>">用户操作日志</a></li>
           
        </ul>
    </li>
    <li>
        <a href="<?= UrlService::BuildNullUrl();?>">
            <span class="glyphicon glyphicon-edit f12" aria-hidden="true"></span>
            <span>题库</span>
            <span class="glyphicon glyphicon-menu-right f12 fr" aria-hidden="true"></span>
        </a>
        <ul class="nav-left-container-small">
            <li>
                <a class="J_menuItem" href="<?= UrlService::BuildUrl('admin/paper/index');?>">出卷</a>
            </li>

        </ul>
    </li>
    <li>
        <a href="<?= UrlService::BuildNullUrl();?>">
            <span class="glyphicon glyphicon-duplicate f12" aria-hidden="true"></span>
            <span>老师</span>
            <span class="glyphicon glyphicon-menu-right f12 fr" aria-hidden="true"></span>
        </a>
        <ul class="nav-left-container-small">
            <li>
                <a class="J_menuItem" href="<?= UrlService::BuildUrl('/admin/examination/editpaper');?>">批改试卷</a>
            </li>
            <li>
                <a class="J_menuItem" href="<?= UrlService::BuildUrl('/admin/examination/setexamination');?>">设置考试</a>
            </li>
            <li>
                <a class="J_menuItem" href="<?= UrlService::BuildUrl('/class/scoresurvey') ?>">班级成绩情况</a>
            </li>
        </ul>
    </li>
    <li>
        <a href="<?= UrlService::BuildNullUrl();?>">
            <span class="glyphicon glyphicon-hourglass" aria-hidden="true"></span>
            <span>UI元素</span>
            <span class="glyphicon glyphicon-menu-right f12 fr" aria-hidden="true"></span>
        </a>
    </li>


</ul>

 <div class="col-sm-10 col-sm-offset-2 col-md-10 col-md-offset-2 coll-lg-10 col-lg-offset-2" style="position:relative;">
    <?= $content ?>
    <footer>
        <p class="pull-left">&copy;kervi</p>
        <p class="pull-right">by <?= date('Y') ?></p>
    </footer>
</div>


<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
